package com.BraveY.Demo04;

import java.util.Scanner;

public class Demo05 {
    public static void main(String[] args) {
        Scanner S = new Scanner(System.in);
        System.out.println("请输入一个字符串:");
        String str = S.nextLine();

        StringBuilder newStr = new StringBuilder(str);
        newStr.reverse();

        if(str.equals(newStr.toString())){
            System.out.println("是对称字符串");
        }else {
            System.out.println("不是对称字符串");
        }

    }
}
